package com.zhuoli.service.springboot.kafka.producer.service.impl;

import com.zhuoli.service.springboot.kafka.producer.service.MessageControllerService;
import lombok.AllArgsConstructor;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Service;

/**
 * @Author: zhuoli
 * @Date: 2018/9/4 11:00
 * @Description:
 */
@Service
@AllArgsConstructor
public class MessageControllerServiceImpl implements MessageControllerService {
    private KafkaTemplate kafkaTemplate;

    @Override
    public void sendMessage(String topic, String content) {
        kafkaTemplate.send(topic, content);
    }
}
